
<%
  topic = Topic.new
  # topic.competition = competition
  topic.topic_container = competition
  remark = Remark.new
  remark.topic = topic
%>

<div class="" style="padding-top:10px;width:75%">
  <div class="bar title_bar"><h4>新主题</h4></div>
  <div class="bar body">
  <%= form_for topic, html: { id: 'form_tnc' } do |f| %>
    <%= f.hidden_field :topic_container_id %>
    <%= f.hidden_field :topic_container_type %>
    <dl>
      <dt><%= f.label :title, '主题' %></dt>
      <dt><%= f.text_field :title, style: "width:100%" %></dt>
    </dl>
    <%= fields_for 'remark', remark do |f_r| %>
    <dl>
      <dt><%= f_r.text_area :content %></dt>
    </dl>
    <% end %>
    <%= f.submit '提交', 'class' => 'button primary form' %>
  <% end %>
  </div>
</div>